package com.king.juc.n8.threadpooldemo.forkjoindemo;

import java.util.concurrent.ForkJoinPool;

/**
 * Fork Join 案例
 * @author king
 * @date 2020/12/12 20:39
 */
public class ForkJoinTest {
    public static void main(String[] args) {
        ForkJoinPool pool = new ForkJoinPool(4);

//        System.out.println(pool.invoke(new MyTask(5)));
        System.out.println(pool.invoke(new MyTask2(1, 5)));
    }
}
